home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8946 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.IT.net!news
  2. From: gema001@pn.itnet.it (Antonio Romeo)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Is there a standard for * and & placement style?
  5. Date: 27 Feb 1996 15:58:44 GMT
  6. Organization: CyberPress
  7. Message-ID: <4gv9nk$4p2@alpha.it.net>
  8. References: <3128BD31.4AF8@wildfire.com> <marnoldDn27q9.Is0@netcom.com> <4gckd5$bc7@clarknet.clark.net> <marnoldDn63vB.H6n@netcom.com> <4gihqq$1s9@ns1.arlut.utexas.edu>
  9. NNTP-Posting-Host: gema001.pn.itnet.it
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.7
  13.  
  14. >...
  15. >-- use intelligent variable names
  16. >...
  17.  
  18. a bit more on this:
  19.  
  20. intelligent variables names are meaningfull names.
  21. So 
  22.  
  23.     int i; /* loop counter */
  24.  
  25.     ...
  26.  
  27.     for (i=0;i<MAX; i++)
  28.         MakeOnArray(arrayname[i]);
  29.     ...
  30.  
  31. does not is a good name. In a loop, i is the current processed element
  32. of an array, the next or the previous? 
  33.  Another good practice is to not make
  34. assumption on variable values after al loop, expecialli in a FOR
  35. statement. This is true for every language I know. The variable value
  36. after a loop depend on compiler (not language) decision.
  37.  
  38.  
  39. Good work
  40.  
  41. Antonio Romeo - Rome - Italy
  42. gema001@pn.itnet.it
  43.  
  44.  
  45.